package com.study.blog.service.impl;

import com.study.blog.mapper.ArticleMapper;
import com.study.blog.model.entity.Article;
import com.study.blog.model.vo.ArticleVO;
import com.study.blog.service.ArticleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService {

    @Resource
    private ArticleMapper mapper;

    @Override
    public List<ArticleVO> getAll() {
        return mapper.getAll();
    }

    @Override
    public ArticleVO getArticleById(String id) {
        return mapper.getArticleById(id);
    }

    @Override
    public Integer insert(Article article) {
        return mapper.insert(article);
    }

    @Override
    public Integer update(Article article) {
        return mapper.update(article);
    }

    @Override
    public Integer remove(Long id) {
        return mapper.remove(id);
    }

    @Override
    public Integer getArticleTotal() {
        return mapper.getArticleTotal();
    }

}
